implemented fallback to copy on rename failure