Overwrites the file, deleting it if it exists
Overwrites the file with the provided writer, deleting it if it exists