fix bug loading hooks file to late