I am not sure if the code being deleted is same as runRemoteScriptAsSudo() - I don't see any mention of sudo in this code.