Resource handling in Cats Effect 3