Added primitive logging function