Added Error handling system