also write error message to the log