Made the error method private