Catch errors

Do you want to catch exceptions like `KeyboardInterrupt` or `SystemExit` here? If not, I'd recommend changing this to `except Exception:`