slightly more lenient BAM header parser
send table output to stdout, bam only to files