Handling corrupted sam files