only write file header if file does not exist. Otherwise, append results