Added trace debugging