Tweaks to debug logging.