Merge "when corruption occurs, log a warning before closing db"