Only log error when it actually occurs