reboot only if necessary