Chdir error fixed