hooks: write log in log/ sub-directory