Fix the `file::end` hook.
Update the `file::end` hook.