moved resolve-rootfolder to separate script