patch IO handling
distinguish between files and directories
change from DirectoryStream to Files.walkFileTree. DirectoryStream do not recursive into sub-directories.