Added some trace logging