some modifications to download method in csv module