add support to exit insert mode when saving is done