Ensure we write when we need to