write pieces only when ready