Sorry for the repeated post. But I suggest a break, because of the maintenance that is being carried out on my server.
Before the script stops or actually doesn't move and show any new status, it shows the above warnings and then the errors. That's why I was assuming it's happening once it's receiving a lock topic [(maybe locked?)]. Every time it stops on the error I increment the const startPage with +1 and works just fine. Right now I am on 167 page out of 465.