Enclose failing statement in try-except + logging.