Extract file download out into a separate class