Fix issue when source and destination has the same path

It should override the source rather than creating an empty file.