fixed bug with fs.watch and test mode