using both stat and lstat