Once all data is written terminate writes and flush eagerly