ThreadMonitor class reference error in main