fixed file watcher to handle empty directory name