use pump to error handle streams