Fix for truncated error messages on Windows