Bug with ovveride file was repaired

Now when new file is created an old one (renamed earlier) is removed and
new one is renamed