last error detection working OK