Let's log error on hooks

Also applied this so some compiler will shut the fuck up..