Added Pageredirection and Systemlog calls on Error