I think this could just start with `if !prog.status.success()`, and this would benefit from the to-string refactoring mentioned above.