Try commenting out all the code between OpenFile and CloseFile to see if it's this which is causing the hang. If so, you could add the file to an area rather than using OpenFile, to see if that helps.
This is not the issue of upgrade SERP. But serverip.dat in this case contains the value: 192.168.88.12:1301, so this is local IP of the server with SERP.
Anyway I don't understand what do you me...