History logger rewrite, added support for text/HTML exporting