update debug code

(cherry picked from commit 952019f545deeb8d6edbe2b5dccd5df24066d1a2)
remove duplicated debug log

(cherry picked from commit 261304788760f5e593a12d85fef173cba1e9412d)