improved ctags hook w/ locking