wirte log to flie