Refactoring: querying current export dir moved into own function