Added missing fclose