updated documentation and var setting failsafes