Add more logging around download_attachments