create option to specify file download or raw output