Updated to print thread id