Greatly simplify getServiceName's implementation by using synchronous
file read.