Modified generate_file_name() to generate the correct file name with the appropriate path for index.html.