added rootpath option