Try again (up to ten times) if main loop exits prematurely.