add type ascii mode and debug first cwd.