Update run() to catch and ignore ExitMainLoop for clean exit