flush output in case of exception
Merge pull request #1 from sparr/master

flush output in case of exception