Added convenient debug logging.