Changed export to download a file