close the file to be clean