make sure service doesn't restart too often when failing
cleanup using JSLint