Now records data properly for multiple bam files.