Bug fixes and example update

Fixed a bug that caused timeout issues on Windows
Fixes to error handling