add debug log to trace bug.