Removed debug logging. Fixed sudo exit code handling.