empty the file when corruption detected