updated before_symlink hook