optimize save logs