Remove logging bugs and giving data integrety checker some use