write dbStateFile for non-POSIX platforms. Does not write synchronously.