Fix hook file detection