Changing raise to sys.exit as requested by deanj