Correcting logic of getting the list of files in the download window