Have to use sys.exit on older versions of python