fixing checks against config["publish"]
Merge pull request #63 from InCNTRE/saveResult-fix

fixing checks against config["publish"]