jumk - I would probably do something like Enlil suggests and not chdir at all. That having been said, let's try and troubleshoot your existing code. First of all what is the error message in $!? Does the /logg directory exist? Do you have permission to cd to it?