getRootErrorMessage extracted into util class