add debug log for chat