implemented file renaming & small improvements to file code