Prepare for error handling