Provide error handling
Fix up error handling