string logging not right