Improved handling when errors are caught before the logger is initialized.