Added checkError