Fixed WaitForSingleObject and WaitForMultipleObjects (timeouts incorrectly sets). Added detailed error reporting, better timeout error handling.