[Fix] close->fclose for cross-platform compatibility