removed the file close from what used to be the file write