added trailing space removal for all .foo files