Handle errors in utils