refactor data file download