Fixing an issue where curl runs out of memory and using streaming file option instead