write nodes.json directly without creating nodes.json.new first