dirname, not basename!