Added error checking for json.Unmarshal