added some logging.