Install error hook