modified the installer to add a file in sudoers.d instead of directly modifying sudoers.
added local declarations for all variables used in a function
added local declarations for all variables