added debugging info for threads