Add the option of writing results to a file use