Updated logging
Forgot to close session factory.