added check for is sudo, otherwise we run into permissions issues