Fix build warning
Fix error message processing on Windows.