started flushing output stream in threads