fix writeLog output order