Fixes to support fs.watch