ensure close file before rename bookmark file.

must close file before rename bookmark file on some os( win32 )