check coherence of TC DB

More code to check the internal file coherence.
It's mainly about checking that the bucket section is correlated with the record section.