In all instances here and below where you're `sys.exit`-ing, instead just raise either a `optparse.OptionError` (when the problem is rooted in selecting inappropriate options) or a `RuntimeError` (when the problem is rooted in something outside that) with an appropriate error message -- probably the string you're printing right above it.