fix: Use capture3 to capture output (prevents deadlock)