fix log msg.
add flushBatchOps to cache env.
use debug to print debug message.