Added error handler for better exception handling