Need to store output in buffer, not echo