add support for downloading file to a Buffer.