docs: def save_diskspace(fname, reason, config):
      """Overwrite a file in place with a short message to save disk.
  
      This keeps files as a sanity check on processes working, but saves
      disk by replacing them with a short message.
      """
      if config["algorithm"].get("save_diskspace", False):
          with open(fname, "w") as out_handle:
              out_handle.write("File removed to save disk space: %s" % reason)