changed to read from index.html
added require for fs
fixed use of readFileSync