print "dir: $dir file:$file newfile:$newfile\n"; #before the next unless statements.