added debug traces