we expect user can download the document if successfully output as a stream.That's probably a bad assumption, as you've already seen ;-)
Is the output as a HDA-string when failure expected from UCM rather than throwing exception?It should be easy enough to parse the actual response to retrieve the status code that the system throws. You shouldn't need to open the file to find the error.
should tell you if the file was found. A status code of -16 would mean that the file couldn't be found. In the case of a successful GET_FILE, it doesn't appear that a status code is even present, so just testing for the mere presence of a status code should be sufficient.