Rewrote to use watchdog to trigger file system events.