throw exception if private key is missing