add retry logic to copy from

closed could be checked outside the loop, couldn't it?