add logging for error checking
Merge pull request #294 from CruGlobal/fix_emails

add logging for error checking