Fix WriteHTMLForTracesToFile