modify file path: support directory