In 1894–1895 he was in Nepal and Northern India collecting oriental manuscripts for British Museum.
During the winter 1898–1899 he returned to Nepal and together with pandit Hara Prasad Shastri and his assistant pandit Binodavihari Bhattacharya from the Asiatic Society in Calcutta, the team registered and collected information from palm-leaf manuscripts in the Durbar Library belonging to Rana Prime Minister Bir Shumsher J.
B. Rana, and here he found the famous historical document Gopal Raj Vamshavali, describing Nepal's history from around 1000 to 1600.
He was Professor of Sanskrit at University College London from 1895 to 1902, and at Cambridge from 1903 until his death.
He died in Liverpool in 1906 and is buried at the Parish of the Ascension Burial Ground in Cambridge.