Added log lines to find multithreading bug.