commented the error printing routines
fixed potential bug in diagonalcheck