When the upload is aborted/abandoed because the source file is missing, the write stream is never destroyed. This dangling write stream can later error and cause a crash. Instead, create the write stream on demand and nearer to pipeline() to make sure we do 'error' handling.