Fix error handling in metadata cursor. [#1094]
Fix error handling in statistics log configuration. [#1095]