commite before sleep