Refactoring to use watchdog rather than naive homegrown file system observer