So these trade caravans are coming from miles and miles away, and I'm guessing it took them awhile to get here. So they arrive at the trade depot finally, and this is when the food starts to rot? when they arrive at the settlement? It's hardly worth fixing over, but I just thought I'd put it out here.
There are many ways of solving this slight confusion.
I'd suggest that all food MUST be traded from within a barrel.(bins for everything else would be nice too)