Add debug details for detection init/cleanup