Modified logging functionality