write to split files