added key generation logging