Added log.error function