Fix open file leak.