Issue #1404. Initial implementation of WAL  was added.