Greetings,
After running your current project, it appears that there is a problem with the URL that you are using to download the image file. While it sets the name of the image correctly, if you rename the file [login to view URL] to .txt you will see that it has actually downloaded a html file of the website's home page.
You should be able to hit the url [login to view URL] in the browser and the image should load.
Please let me know how I can be of assistance to you on this project. Thanks.
Regards,
Jinesh