optimise log file usage