Fix unexpectedly overwritten files