change the checkError functions