add code for detecting broken BAM files