fixed the os write windows error