Adding write to file in temp dir for json planned partitions