mkdir $dir or warn "$dir already exists: $!";