Consolidated error handling
Improved parallel on Windows