Port:Add safe replace existing file is larger but new file is proper.