FileMonitorPtr FileMonitor::Create(){
	if (sMonitor.expired()){
		FileMonitorPtr p(new FileMonitor, [](FileMonitor* obj){ delete obj; });
		sMonitor = p;
		return p;
	}
	return sMonitor.lock();
}
FileMonitor& FileMonitor::GetInstance(){
	if (sMonitor.expired()){
		Logger::Log(FB_ERROR_LOG_ARG, "FileMonitor is deleted. Program will crash...");
	}
	return *sMonitor.lock();
}