Well, that would be another doable way. I was just thinking, that `ENOENT` should be the most common (and easy to check) problem. Anything else is then reported by `dlerror()`. Duplicating the stat-calls is not a big deal IMHO since this code is not performance critical.