Move thread_monitor() to outer threads