Improved error message handling further.