adds JSON parse/serialization error logging