The answer is a log file.
In case of unexpected errors which sometimes cause for a program to shutdown unexpectedly, data errors are logged in a file called log file. Log file holds the record of events occur in operating systems and software application. The process for keeping a log is called Logging.