# Step 2: Verify integrity if self.verify_file(temp_file, program_number): # Rename temp to final os.replace(temp_file, output_path) logging.info(f"✅ Verified download complete: output_path") return True else: logging.warning(f"Verification failed on attempt attempt") os.remove(temp_file)