Fix delays in main loop and logger