Refactors the code to avoid repetition. Adds log_reconstructor and log_displayer.
Solves a bug in the previous commit that wouldn't update the file when logging a new story.