Added logging for text messages.