Skip the printf and use curl -o, Luke.