modifed web.js to read from file