Separate directory traversal from ontology reading