1. Put a /write -c file.txt in the Sockopen event to clear the file before making a new request.

2. Right, I don't know why did you put an echo -s $regsub(..) instead of the default !.echo -q $regsub(..). change it back and the numbers will be hidden.