Better sleep before reboot code