Asserting `fd' exists inside the with