made renameFile() functional