refactor Log to give more accurate results