create the file before writing to it