Fixed error logging bug.

FIXED: If display errors was off, error logging was not working.