The validation step is moved to the end to avoid the loss of files that may lead to verification failure. Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>