Added "on leave" options in the config
Added checkers for the "on leave" options