- my $s = readfilestr($main::data, $name);
- my $self = eval $s if $s;
- dbg('err', "error in reading $name in DXHash $@") if $@;
- $self = bless {name => $name}, $pkg unless $self;
+
+ # move existing file
+ localdata_mv($name);
+ my $s = readfilestr($main::local_data, $name);
+ my $self = undef;
+ $self = eval $s if $s;
+ dbg("error in reading $name in DXHash $@") if $@;
+ $self = bless({name => $name}, $pkg) unless defined $self;