Is it possible that some other portion of the code is producing the extra echo line? Using the exact code as above, I'm not seeing the extra echo. Maybe unload the main script, and make a new one only using the above code.

Also, there is another instance of the /sockclose findap that you didn't fix:

if ($+(*,%street.num,*,%apt,*,,*) iswm %nc) {
  var %nc = $right(%nc,20)
  var %nc = $left(%nc,14)
  echo -s %nc
  did -ra Observer 15 %nc
  set %match found
  [color:red]sockclose findap[/color]