add wait and timeout clause to wait until reboot is done