Debugging corrupted database