Improved error handling
Thread pool management