Fixed ArgumentNullException bug in ParseVariableUse().
Updated error logging to provide more information.