I had the same problem. I think it quit on this line.
code:
  
$sOutput=$sOutput+@CRLF+'CD Gap = '+formatnumber($adCDGap[$iCDNum-1],2)

It also quit on more lines farther down in the script if i commented that line out. Everytime line the script quit on was using the formatnumber() function.

I just removed all references to formatnumber(). For example, I changed the above line to

code:
  
$sOutput=$sOutput+@CRLF+'CD Gap = '+$adCDGap[$iCDNum-1]

That seems to have fixed it for me.
_________________________
Eric