Is it lacking os.chdir(downloadDir) after this line ?