updated file opening and closing behavior to fix buffer flush issues
updated file opening and closing behavior to fix buffer flush issues

groupon/metrics,groupon/metrics,ArpNetworking/metrics,groupon/metrics,ArpNetworking/metrics,groupon/metrics,ArpNetworking/metrics,groupon/metrics,groupon/metrics,groupon/metrics