Better error messages for hook syntax errors