use io.Copy

instead of reimplementing it