better error logging + variable names