code: def _emit(self, s):
      
      if os.path.exists(self._html_dir):  # Make sure we're not immediately after a clean-all.
        self._report_file.write(s)
        self._report_file.flush()
docs: Append content to the main report file.