Han's modification
additional mismatch back to 1
update targetfolder