Alternatively, you could just print this at most once. That way the person can see the error message in their log but it won't, e.g. fill up the disk on their machine.