Log an error message and turn on debug