AES Encryptor better error handling