fix replace will delete file