Add option to disable chdir