Added error-reporting.