change web.js to read file asynchronous