use downloadStream() first