Journal files are a common solution to the problem of how to quickly achieve the goal of committing data to disc so one does not lose data - but doing so quickly keeping in mind that file I/O is more efficient in large chunks.
Data is committed frequently to the journal file before being saved into other locations - so this means that if power is lost, the system can replay the journal file to recover data.
...