Moving include attachments to function