add debug log at sendMessage method