cleanup
add log replay