corrected chdir