Check log level before doing work
Change try remove key pair method semantics