Fix naming of HTML, fixed duplicate writing of HTML,

Better LXF detection,
Do not display filename if `UnicodeEncodeError` is raised