Changed logging slightly