Adds some debugging to repair_test