Changed how output is collected