flush output buffers after each task