Fix copying of existing files