remove attachments before extracting data