Flush STDOUT when app is finished