Added missing step of deleting cursor in case of an error reading blocks from disk.
Pointer for GetStats() is now scoped rather than manually deleted.