add test tool and debug traces