update test code and print debug