reset file name and delete error file