berkelium: windows null pointer fix for WriteFile