[mod] better function name
[mod] better test for path emptiness
[mod] better variable naming