fixed uninitialized return error if StartAndGC fails

if the error is caused by adapter.StartAndGC, the error that should be returned is not properly updated
instead, a local variable is created and used