Fixing Coverity issues and changed cout to FairLogger
Removing unused ifs
Changing char array comparison