Fixing Coverity issues and changed cout to FairLogger