implement inotify directory watcher