Addedd logging functions