Can you open this file handle with a variable and then close it at the end of this for-loop?