Adding logging.
Adding logging.