Refactoring FileDownload samples