file = file.substr(0, file.lastIndexOf(".")) + ".htm";