Added more debugging print statements to track threads, occasionally
there is a thread that never completes and terminates the program.