Unit test for formatConfig().
Unit test for safeWrite().