Automatic restart application design example