Return setup scripts in the consistent state

Change-Id: I3708db662f9c25498a5fe7ec086994247cbfce33