Hmm, I figured it out, Problem is with getudn.txt, at the time of creation on this file, every time it added a extra line a the end, and when i used FileRead, i am having problem, now i changed to
$uDn = FileReadLine($sFile, 1)
It worked fine..
Thanks
Saugata