Minor change in error handling and reporting.