    name="screenshot_"
    counter = 1
    extension=".png"
    while io.open(name..counter..extension, "r") do
        counter = counter + 1
        io.close()
    end
    screen:save(name..counter..extension)