repair failed merge && handle errors from simplejson library