Added checking if either private or public key already exists