filemanager working with directory and files better