set up fsync with index file and web.js