Added visit logging functionality