Updated web.js with buffer output instead of fs encoding