more inclusive error checks to handle test case races