stop progress bar on failure
pass context on to attachmentType functions