Made load_sam_file support both sam and bam