Generates error statistics.