refactored logging, fixed disconnect log