clean up commit before logging off