Avoiding overriding files when not necessary