added d3.json error detection