Sanity-check descriptors using metrics-lib before writing them to disk
In #5805 (moved) we found that we have quite a few files that are either empty or truncated. We should parse all descriptors with metrics-lib and only store valid descriptors to disk.