added debug for cwd