do not overwrite file if there are some errors
Merge pull request #2 from wb14123/err-fix

do not overwrite file if there are some errors