correct debug logging