added support for restartOnCrash option