Added some simple Win32 specific error handling.