first working code for downloading content file