Good catch - looks like i was modifying a global `err` below.