Test main loop and errors.