Updated web.js
added fs module
added encoding to buffer