Removing a line that I don't think this makes line sense / does anything

Morally, were you trying to clean out the workspace? I assume so. But those PNG filenames weren't attached to objects sitting in the workspace anyway, unless I'm confused about something. I think the file.remove() command is all you want here.