Correct debug log management