Added option to ensure attachments