 
         watchSubdirectories()
         
-        source = dispatch_source_create(DISPATCH_SOURCE_TYPE_VNODE, UInt(fid), DISPATCH_VNODE_WRITE | DISPATCH_VNODE_DELETE | DISPATCH_VNODE_RENAME, DirectoryWatcher.watcherQueue)
+        source = dispatch_source_create(DISPATCH_SOURCE_TYPE_VNODE, UInt(fid), DISPATCH_VNODE_WRITE | DISPATCH_VNODE_DELETE | DISPATCH_VNODE_RENAME, DirectoryWatcher.WatcherQueue)
         dispatch_source_set_event_handler(source) { 
             let mask = dispatch_source_get_data(self.source)
             if mask & DISPATCH_VNODE_DELETE == DISPATCH_VNODE_DELETE {

    }

    deinit {
        let nc = NSNotificationCenter.defaultCenter()
        nc.removeObserver(self, name: DirectoryWatchDirectoryDeletedNotification, object: nil)
        nc.removeObserver(self, name: DirectoryWatchDirectoryRenamedNotification, object: nil)

    }

    public func stopMonitoring() {
        guard monitoring else { return }

        performOnWatcherQueue {
            for (_, submonitor) in self.subdirectoriesWatcher {
                submonitor.stopMonitoring()
            }
            self.subdirectoriesWatcher.removeAll()
            self.subdirectories.removeAll()
            dispatch_source_cancel(self.source)
        }
    }

    private func watchSubdirectories() {
        performOnWatcherQueue {
            guard self.autoWatchSubdirectory else { return }
            var directories = Set<String>()
            if let directoryEnumerator = self.fm.enumeratorAtPath(self.watchPath) {
                for file in directoryEnumerator {
                    let directoryPath = self.watchPath as NSString
                    let fullFilename = directoryPath.stringByAppendingPathComponent(file as! String)
                    var isDir: ObjCBool = false
                    if self.fm.fileExistsAtPath(fullFilename, isDirectory: &isDir) && isDir.boolValue {
                        directories.insert(fullFilename)
                    }
                }
            }

            directories.forEach {
                if !self.subdirectories.contains($0) {
                    self.subdirectories.insert($0)
                    let dw = DirectoryWatcher(watchPath: $0, autoWatchSubdirectory: true)
                    dw.delegate = self.delegate
                    dw.startMonitoring()
                    self.subdirectoriesWatcher[$0] = dw
                }
            }
        }
    }

    @objc private func removeSubdirectoryWatcher(notification: NSNotification) {
        performOnWatcherQueue {
            guard let deletedPath = notification.userInfo?[DirectoryWatchPathKey] as? String else { return }
            if self.subdirectories.contains(deletedPath) {
                self.subdirectories.remove(deletedPath)
                if let dw = self.subdirectoriesWatcher.removeValueForKey(deletedPath) where dw.monitoring {
                    dw.stopMonitoring()
                }
            }
        }
    }

    @objc private func clearRenamedWatcher(notification: NSNotification) {
        performOnWatcherQueue {
            guard let renamedPath = notification.userInfo?[DirectoryWatchOldPathKey] as? String else { return }
            if self.subdirectories.contains(renamedPath) {
                self.subdirectories.remove(renamedPath)
                if let dw = self.subdirectoriesWatcher.removeValueForKey(renamedPath) where dw.monitoring {
                    dw.stopMonitoring()
                }
            }
        }
    }
}

private func performOnWatcherQueue(block: () -> Void) {
    let specific = dispatch_get_specific(&DirectoryWatcher.QueueSpecificKey)
    if specific == &DirectoryWatcher.QueueSpecificContext {
        block()
    } else {
        dispatch_async(DirectoryWatcher.WatcherQueue, block)
    }
}