save on exit of insert mode