Buffer output before outputting result