Fix and improve the log