perhaps a more idiomatic and easily extensible way of writing this would be to do something like

```erlang
case lists:filter(fun is_file/1, ListOfPaths) of 
    [] -> {error, notfound};
    [Location] -> {ok, Location};
    _ -> {error, too_many_sysctls_yo}
end
```