Add dumpSessionKey, clean code