Improved logger speed (a bit) by delaying file close