fyi, I think this could be moved up inside the try (and removing the variable)