Properly outputs the buffer when code times out
Merge pull request #22 from azhao12345/master

Properly outputs the buffer when code times out