Handle Error function added