replaced rename() by renameUsingShell()