bam output is optional