How to select non-corrupted data from segment with corrupted blocks