differentiate between raw and download
fixes #578
Merge pull request #708 from vladak/download

differentiate between raw and download