Change directory watcher

Better than a setInterval IMHO a file monitor event-based seems a better option. By the way the logic is easier