Properly outputs the buffer when code times out