Build root elements in DirectoryLoader