add better error detection message