open(LOCAL, ">$dir/$name") or print $!;