write to file fix - multiline msgids handling