Improved thread watcher