cosmetics
read/write from the log

(WIP: some cases are still missing)