Improved data.json error handling