Use $dir everywhere