output error correctly.