on error, check error stream instead of input stream