modified web.js to read from fs