finished refactoring path handling, added info level for less debugging