Updated CSV download method