rework file scanning and watching to not use polling

use fs.watch instead