Moved writing errors statistics to ConsoleErrorsWriter. Resolves #1839.