Fix unfinished method for downloading files