Updated web.js with fs and buf