handle attachments in subdirectories