Improved error reporting and timeout.