I wasn't sure file_puts_content could create the file if it doesn't exist. Will try