Some error-logging updates