log persitence implementation