Handle cwd