edit: the main rant about err was that it is left in scope but I believe the author does not like that