commit before leaving