Added flock (File lock) to generate new keypair