Instead of doing a `print` + `exit` use `raise ValueError("Unknown algorithm: %s" % alg)`