fix close file