MOD: add log and read functions