Making sure cwd is consistent