Unable to open counter data file for writing