Fix tests by ensuring LogCollector is in the right state based on the DEBUG state