This is incorrect as well. I supposed to check variable `err` not `e`. And in your approach this check is just meaningless.