Getting error chdir doesn't work, using shell