Improved file watcher