Add comprehensive logging.