added check for determining container root path