@smoothlystable awesome. I'll give that a try to see if the error is reproducible. Out of curiosity approximately where are you geographically located? I wonder if it's a latency issue affecting the timing.
That make sense. Thanks for checking it out. Seems like it is something network related. I tried the same script on another desktop (other location in Sweden) and it's been running for 13h now, without any errors.