Wrote a function to determine the current revision number and rename the old files