better error handling for ann-var
use lexical-let