Added Error handle part