removed checking for file and opening it after rename.