exit 1 only when command failed