Make sure we flush after shutting down writes