Logger and fix bug

fixing JSONArray bug,
adding logger options