Error handling and design