Updated main loop without failure loop.