flush write log