replace sudo by try_sudo