$rc = Open(2,"pcchange.log",2)
$rc = Open(3,"pcchange.new",5)
$LineIn=ReadLine(2)

here you will open the pcchange.log on every loop and read the first line.
which obviously is all the time the same.

$rc = WriteLine(2,$LineOut)

here you try to write to the same file, you opened for reading.
you probably ment something like:
$rc = WriteLine(3,$LineOut)
_________________________
!

download KiXnet