strip begin and end spaces of the trace file