updated reporting logic, added options.debug to output raw json