changes customErrorMsg access to public