add fclose, fixes issue from bdb96b9af85256f9b3f8663ccf6d27b3d1330918

@PVince81 @MorrisJobke