code refactoring, accepting certificate path from user, using pem file created during certificate creation for ssl communication