err was out of scope