Set up basic error handling