protected override void PreStart() { try { _chan = _f.Open(_fileMode, FileAccess.Write); base.PreStart(); } catch (Exception ex) { _completionPromise.TrySetResult(new IOResult(_bytesWritten, Result.Failure<NotUsed>(ex))); Cancel(); } }