use sys.exit and main