improve DirEntry construction and FileException usage