impl tstream send file optimization