Use dir name instead of filename.