Add Logging to CheckText and CheckMsgText functions