Added logging of sent messages