Add error text per @mharsch, move to snprintf