I wonder if it makes more sense to return the error instead of logging it, and then having the caller handle the error?