avoid mutating path, so that error will get array