Write files as we go