I think these 2 lines should be moved inside the `try` block.