fix hook for binary files