history.json seems more fitting
separated logging, and added a null object that can be used to disable it