record the error message too