add $follow_symlink parameter
take into account scnadir return value