do not overwrite file if there are some errors