bug fix: start post copy until the resource will never be used again

add a simple sleep and check logic before calling postCopy method
test code