Added logging functions