Print exit code only once after command failed.