Added a sleep timer before restarting