added sys.exit(1) on fail