Move sys.exit to outside main runner.