added encoding to web.js readfile