I don't really like the
```ruby
begin
  ...
end while ...
``` 
construct. in this case since the logic is pretty simple, I'd put back the `loop do` and replace both `relaunch = ` with a `break`.
```ruby
  break unless @restart == "always"
  break unless @restart == "error"
```
and put back the `sleep(10)` at the end of the loop