You should elaborate a bit about how you download your document: microflow or form. In a form you can have a download action button and there you can set to show the document in the browser if possible. You have to make sure though that there is a document to view. You could place the name of the document above the download button so you can visually check that the document is there. In a microflow you could set a breakpoint to make sure you have a filedocument before you try to download it. Hope this helps.
Regards,
Ronald