use proper dir test