Move ReadPrivateKey to a separate file.