Altered file download code
Fixed merge conflicts