Having more than a single line would fail because you are using the singular “line of it”. That will flag an error if there is anything more than a single line in the file - 0 lines, 2 lines, etc.
So you need to use the plural “lines”, and then find whether the line you’re looking for exists in the file. Likewise, using the plural “files” will suppress the error if the file does not exist -
exists lines whose (it = "server-group-1") of files "c:\operations\group.txt"
You can extend that with some handling of extra spaces and mixed-capitalization as well - exists lines whose (it as trimmed string as lowercase = "server-group-1") of files "c:\operations\group.txt"