This should be moved into `PartitionedDatasetWriter`, which is what handles partitioning. The file writer doesn't need to know about partitioning.