Use logger, rather than direct console.error (adds useful timestamps).