ReferenceError: log is not defined