use right cwd for jsonout