be careful when using FreeFileHandle() - don't get caught out by this schoolboy error:
Code:
$fhLogFile=FreeFileHandle()
$fhOutFile=FreeFileHandle()

; Open log file...
If Open($fhLogFile,"c:\temp\log.txt",5) "CANNOT OPEN LOG FILE"+@CRLF Exit @ERROR EndIf

; Open out file...
If Open($fhOutFile,"c:\temp\out.txt",5) "CANNOT OPEN OUT FILE"+@CRLF Exit @ERROR EndIf