fixing log print.