fix bug with rename file if exists