Simplify log-module.
Fix read/write in json format.