Writes the output from the URL request to a file firing events.