BAM error handling improvements.