added datarootdir handling