Updated to use futures and write files on successful fetch