Rewritten config read/write