Agreed. There are various ways of addressing that, but here’s one relatively simple one (pluralize the object):
if (exists (computer name) whose (it as string as lowercase = "xyz" as lowercase)) or (exists (computer name) whose (it as string as lowercase = "xyz1" as lowercase)) then lines of files "/tmp/netcool.txt" else lines of files "/tmp/netcool1.txt"
The following is good reference to better understanding errors returned by relevance statements and troubleshooting them: Common Relevance Error Messages