Updated to work with the new thread watcher