Refactor file watcher and move path to configuration