pruning log at midnight