added with statement for openning private key file