use path.dirname