Modified the script to generate a html file