output error detection