use pattern option instead of pathRegex