Improve logs in math