fix the logging: need to serialized to JSON