Improved error handling for EncryptText and ReadUsernameXML
Improved error handling for EncryptText and ReadUsernameXML