Better encryption error handling