Modified index.js to read from htmlfile