better saving of logs