added errorExit function; --choose or --list not required