screenshooter: refactor the copy loop