Adding logging to encryption/decryption