changed filenames to pathnames to avoid confusion and fixed buffer param in insertTrie