Refactored & fixed health check code 

Fix: negation operator was bind to string instead of indexOf result.
Merge pull request #8 from fexbraun/fix-healthcheck-logic

Refactored & fixed health check code