Correctly catch error output