Set cwd at first line