Fixed file overwrite