Properly clear the DebugLogger and sql connection