Fixes for coverity issues 51895, 51894 and 51893
Fix for coverity issues 51892 and 51891
Added comments to justify Error printing