refactor, fix path existence tests