check rsa private key instead if pub key
Adjust script to work with latest update