t8003: check exit code of command and error message separately