instead of removing existing folder, do the validity checks of the files and remove these files before overwrite. #8