Fixed some static analyzer warnings
Fixed an error that resulted in incorrect error handling while reading a corrupt KDB file