Clear file before writing.