Experimental inotify-based function to watch files