rename ($old, $new) or die "Failed to rename $old to $new: $!\n";