well before there was the loop with the appending, right? now it seems like you could simply do `python ... | sed ... >${OUTPUT}`.