Fixed download method to write file fetched to disk