Change to use return instead of sys.exit.