Added some trace logging.