always commit before closing