Flex: close open file handles