changed logging method