fixed replacing files