Images hasnt downloaded or created a path

I am at the end of the 2nd lecture, i was coding along with the fastbook production.ipynb but when i tried to pull all links and download them as images and store into folders it isnt working.

The above is the thing i am getting when I tried to see whats inside the folder.

Ooops. i think i am so dumb. I solved this, i didnt create folders (grizzly black , teddy) at first and i think thats why it didnt download images and create the folder. But then why we use mkdir ? I am confused but its solved when i manually created the folders by myself

If someone had the same problem they modify the code as below :

It worked for me!!