commit before shutdown