untested but should work,add this underneath the port list in your script
if($comparison($list total(%proxies),"=",$list total(%port))) {
then {
set(#position,0,"Global")
loop($list total(%proxies)) {
add item to list(%mergedList,"{$list item(%proxies,#position)}:{$list item(%port,#position)}","Don\'t Delete","Global")
increment(#position)
}
}
else {
alert("scraping error,proxies and port should be of equal length")
}
}
then save that file instead