commit before cleanup