- Improved the error handling.