removed echo $dir