Use RAII struct to make file closing exception-safe.
Use RAII struct to make file closing exception-safe.


Former-commit-id: eed3bfbcad3ecfdd15e61f58d95dadacf372241e
darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide