Files not being downloaded affects filename padding

Since the filename padding is dependent on the length of the list of image URLs passed to downloadImages(), its possible that out of 11 images, only two can be downloaded, with the names test00 and test01 instead of test0 and test1. A possible workaround would be to iterate through all image URLs, then store their image data in a new array, if it can be obtained, and then iterating through that new array just downloading all of the data, although there is a potential memory issue there if we store all our image data there. Ironically, encoding into base64 might be able to save us some space here. Thoughts?

Edited by Samuel Crawford