Improving custom attachments and providing an example in documentation