Adding logging of attaching of threads.