now using sys.exit() instead of exit() (compat)