fix printing for logs