Make offset and length in outgoing file transfers work