Adding a sleep before main loop