Now only attempts to log variables if variables are bound in function headers.