Integrity check privacy database and better error handling