this should call read & write repeatedly until the whole file is copied into the target file (at the current position)