Enhance error reporting when public keys are missing