fclose loop test