Code structure of file download