small fix in log write