Error handling implemented'