added sys.exit on exceptions