Added ErrorCheck class