Added health check option
Fix retry, minor code improvement
Added -restart option
Merge branch 'restart'
Merge branch 'retry'