Fix bug in setup output capture