Handle Out of memory and other errors for BIP38 encryption-decryption