Add logging errors
Fix strange bug with php array and json_decode