Added logic to generate the index.html file.