automatic-file-download function is updated to download all files with file structures