Adding some trace logging.