public static void printJustificationToHtmlFile(Justification justification, String file) {
    { Object old$ExplanationFormat$000 = Logic.$EXPLANATION_FORMAT$.get();
      Object old$ExplanationAudience$000 = Logic.$EXPLANATION_AUDIENCE$.get();
      Object old$LogicDialect$000 = Logic.$LOGIC_DIALECT$.get();
      Object old$MostRecentExplanationMapping$000 = Logic.$MOST_RECENT_EXPLANATION_MAPPING$.get();

      try {
        Native.setSpecial(Logic.$EXPLANATION_FORMAT$, GuiServer.KWD_HTML);
        Native.setSpecial(Logic.$EXPLANATION_AUDIENCE$, GuiServer.KWD_LAY);
        Native.setSpecial(Logic.$LOGIC_DIALECT$, GuiServer.KWD_KIF_ONTOSAURUS);
        Native.setSpecial(Logic.$MOST_RECENT_EXPLANATION_MAPPING$, KeyValueList.newKeyValueList());
        if (((FunctionCodeWrapper)(Logic.$LOGIC_DIALECT_PRINT_FUNCTIONS$.lookup(((Keyword)(Logic.$LOGIC_DIALECT$.get()))))) == null) {
          Native.setSpecial(Logic.$LOGIC_DIALECT$, GuiServer.KWD_KIF);
        }
        { ExplanationInfo info = Justification.registerJustification(Justification.visibleJustification(justification), ((KeyValueList)(Logic.$MOST_RECENT_EXPLANATION_MAPPING$.get())));

          info.label = "1";
          info.depth = 1;
        }
        { OutputFileStream stream = null;

          try {
            stream = Stella.openOutputFile(file, Stella.NIL);
            {
              stream.nativeStream.println();
              stream.nativeStream.println("Explanation #1 score=" + justification.positiveScore + ":");
              stream.nativeStream.println();
            }
;
            Justification.printWhynotJustification(Justification.visibleJustification(justification), stream, Stella.NULL_INTEGER, GuiServer.KWD_BRIEF, false);

          } finally {
            if (stream != null) {
              stream.free();
            }
          }
        }

      } finally {
        Logic.$MOST_RECENT_EXPLANATION_MAPPING$.set(old$MostRecentExplanationMapping$000);
        Logic.$LOGIC_DIALECT$.set(old$LogicDialect$000);
        Logic.$EXPLANATION_AUDIENCE$.set(old$ExplanationAudience$000);
        Logic.$EXPLANATION_FORMAT$.set(old$ExplanationFormat$000);
      }
    }
  }