add mutex file
commit before shutdown