here is a why to cutback on the size of the code, asign the chr(13)+chr(10) to a variable, and use the variable where ever you need a line return.

code:

$cr = chr(13)+chr(10)
WriteLine(1, "NAV" + $cr)

More information will be needed to fix this file open error. are you trying to open the file twice?

Bryce