before sleep commit