Be a little defensive about logging.