changed logging slightly