dir only works after download