Making database saving on disk more resistent to failures.
New version.