update for dirname support