updated file download logic
updated file download logic