We should probably add a try & finally block, to return the resource always, even in case of a RuntimeException