Can you open this file handle in a different place that is not the for loop such that you can assign it to a variable that you the explicitly `.close()`?