flush log at VimLeavePre