Added event handlers. For example, restart service if check failed.