Extract method in SudoWrapper