code: public RecordWriter<K,SAMRecordWritable> getRecordWriter(
              TaskAttemptContext ctx, Path out)
              throws IOException
      {
          if (this.header == null)
              throw new IOException(
                      "Can't create a RecordWriter without the SAM header");
  
          return new KeyIgnoringCRAMRecordWriter<K>(out, header, writeHeader, ctx);
      }
docs: Allows wrappers to provide their own work file.