Simplified code of FileWatcherOSX.cpp