document integrity check