better handling of multiline logs