ensure close file before rename bookmark file.

must close file before rename bookmark file on some os( win32 )
How is this different from using defer which was removed two lines above this line ?