check if the file exists before retore it