Add sendMessageToViewer to ensure console logging happens