A very much more optimized way of saving logs