add keys cmd
add batch write option
consider replication
rm tmp files