update error handling in util