Multithreading-related debug logging added