error message fix

Fixed a problem when using a replacement file in  the removeFile method
that would cause a false-positive error