fix file overwrite