add check for bam index