Don't close the file twice