Add table consistency check