replace print e with logging.exception(e)