download external data function now allows user to specify output file