Use new method to log error