Without that - the script fell into an endless loop after 1st screenshot taken.