use atomic_ofstream for mtimedb commits