show the inserted logs correctly

also minor changes according to the comments