Use atomic block in DeepSleep/Hibernate, like SleepHandler does