changed logging mechanism