nodejs server stream error handling