Update duplicate file function