better error handling for broken database.json files