Added file renaming function.