switched to IO::Capture for stability