Redirecting errors to /dev/null and adding checks to avoid duplicate user/group creation