Update for error handling