Fix exit() to sys.exit(1)