I think we can just do:

```
output = "#{output}Unexpected error: execution expired [#{check_timeout}s]\n"
```

This will handler the `nil` case -- and the output will always contain a newline at the end already if it was ever written to.