Reinstate @Technical-13's console.error() with safeguard in place