config: handle private key errors