need to copy the file before deleting in case the file being copied is in public storage already