Added a missing fclose().