add -L option for pwd to avoid side effects