Can we move these 2 lines that increment counter to the newly created method closeWriteFile()? In this way, counters for a file would be updated when that file is closed.