maybe fix open file leak?