adding output of thread number in the log