Remove unused debugging code, but keep integrity check