add dc:type in metadata and handle resource in subdirectory