Fixed the directory monitor