Fixed some error messages
Changed raise SystemExit to sys.exit(1)