dm log: introduce flush_failed variable