throw if path is defined twice