try sudo causes ValueError so switching to subprocess